package com.bw.zh.view

import android.os.Bundle
import android.text.TextUtils
import android.view.View
import com.blankj.utilcode.util.ToastUtils
import com.bw.zg2.base.BaseViewBindingActivity
import com.bw.zh.R
import com.bw.zh.databinding.ActivityLoginBinding

//@AndroidEntryPoint
class LoginActivity : BaseViewBindingActivity<ActivityLoginBinding>(R.layout.activity_login) {


    override fun initData() {
        // s = Software()
//        Log.d("Software", s.name)

    }

    override fun initView(savedInstanceState: Bundle?) {

        dataBinding.tvLogin.setOnClickListener {


            dataBinding.llLogin.visibility = View.VISIBLE
            dataBinding.llRegister.visibility = View.GONE
            dataBinding.tvLogin.setTextColor(getColor(R.color.white))
            dataBinding.tvRegister.setTextColor(getColor(R.color.gray))

        }

        dataBinding.tvRegister.setOnClickListener {

            dataBinding.llRegister.visibility = View.VISIBLE
            dataBinding.llLogin.visibility = View.GONE

            dataBinding.tvRegister.setTextColor(getColor(R.color.white))
            dataBinding.tvLogin.setTextColor(getColor(R.color.gray))
        }

        dataBinding.tvLogin.setOnClickListener {
            if (TextUtils.isEmpty(dataBinding.etPhone.text.toString())) {
                ToastUtils.showShort("请输入手机号")
                return@setOnClickListener
            }


        }

        dataBinding.tvRegister.setOnClickListener {
            if (TextUtils.isEmpty(dataBinding.etPhone.text.toString())) {
                ToastUtils.showShort("请输入手机号")
                return@setOnClickListener
            }
        }

    }

}